Implement fill test1 with vario temperature in oXsConfigurator
[openXsensor.git] / oXs_Configurator / Python 37 Sources / oxsConfig.py
blob3c28b08655227ecd256d568b2b35a5e5c38d941a
1 from tkinter import StringVar , Tk , W ,E , S , BOTH, HIDDEN, DoubleVar , Spinbox , IntVar , filedialog
2 from tkinter import ttk
3 from tkinter import messagebox
5 #from impExp import *
6 import configparser
8 #from oxsConfigurator import protocolChanged
9 #from oxsPpm import ppmTypeChanged
11 configUploadFileName = None
13 config = configparser.ConfigParser()
14 config.add_section("Main")
15 config.add_section("Ppm")
16 config.add_section("Vario")
17 config.add_section("Airspeed")
18 config.add_section("Voltage")
19 config.add_section("Current")
20 config.add_section("Rpm")
21 config.add_section("Gps")
22 config.add_section("AddFields")
23 config.add_section("Frsky")
24 config.add_section("Multiplex")
25 config.add_section("Hott")
26 config.add_section("Jeti")
28 def generateOxsConfig():
29 f=open("oXs_config_basic.h" , 'w')
30 fa=open("oXs_config_advanced.h" , 'w')
31 f.write("#ifndef OXS_CONFIG_BASIC_h\n")
32 f.write("#define OXS_CONFIG_BASIC_h\n")
33 f.write("\n")
34 fa.write("#ifndef OXS_CONFIG_ADVANCED_h\n")
35 fa.write("#define OXS_CONFIG_ADVANCED_h\n")
36 fa.write("\n")
37 fa.write(f"#define PIN_SERIALTX {pinToRxVar.get()}\n")
38 f.write(f"\n#define PROTOCOL {protocolVar.get()}\n\n")
39 if (protocolVar.get() == 'FRSKY_SPORT' or
40 protocolVar.get() == 'FRSKY_SPORT_HUB' or
41 protocolVar.get() == 'FRSKY_HUB') :
42 if frskyVfasVar.get() != 'Not sent':
43 f.write(f"#define VFAS_SOURCE {frskyVfasVar.get()}\n")
44 if frskyFuelVar.get() != 'Not sent':
45 f.write(f"#define FUEL_SOURCE {frskyFuelVar.get()}\n")
46 if frskyA3Var.get() != 'Not sent':
47 f.write(f"#define A3_SOURCE {frskyA3Var.get()}\n")
48 if frskyA4Var.get() != 'Not sent':
49 f.write(f"#define A4_SOURCE {frskyA4Var.get()}\n")
50 if frskyAccxVar.get() != 'Not sent':
51 f.write(f"#define ACCX_SOURCE {frskyAccxVar.get()}\n")
52 if frskyAccyVar.get() != 'Not sent':
53 f.write(f"#define ACCY_SOURCE {frskyAccyVar.get()}\n")
54 if frskyAcczVar.get() != 'Not sent':
55 f.write(f"#define ACCZ_SOURCE {frskyAcczVar.get()}\n")
56 if frskyT1Var.get() != 'Not sent':
57 f.write(f"#define T1_SOURCE {frskyT1Var.get()}\n")
58 if frskyT2Var.get() != 'Not sent':
59 f.write(f"#define T2_SOURCE {frskyT2Var.get()}\n")
61 if protocolVar.get() == 'FRSKY_SPORT' or protocolVar.get() == 'FRSKY_SPORT_HUB':
62 fa.write("\n#define DATA_ID_VARIO 0x00\n")
63 fa.write("#define DATA_ID_FLVSS 0xA1\n")
64 fa.write("#define DATA_ID_FAS 0x22\n")
65 fa.write("#define DATA_ID_GPS 0x83\n")
66 fa.write("#define DATA_ID_RPM 0xE4\n")
67 fa.write("#define DATA_ID_ACC 0x67\n")
68 fa.write("#define DATA_ID_TX 0x0D\n")
70 if protocolVar.get() == 'JETI':
71 if jetiVoltageSourceVar.get() != 'Not sent':
72 f.write(f"#define VOLTAGE_SOURCE {jetiVoltageSourceVar.get()}\n")
73 if jetiTemperatureSourceVar.get() != 'Not sent':
74 f.write(f"#define TEMPERATURE_SOURCE {jetiTemperatureSourceVar.get()}\n")
76 if protocolVar.get() == 'HOTT':
77 if hottCellUndervoltageVar.get() > 0:
78 f.write(f"#define CELL_UNDERVOLTAGE_WARNING {hottCellUndervoltageVar.get()}\n")
79 if hottBattery1SourceVar.get() != 'Not sent':
80 f.write(f"#define BATTERY_1_SOURCE {hottBattery1SourceVar.get()}\n")
81 if hottBattery2SourceVar.get() != 'Not sent':
82 f.write(f"#define BATTERY_2_SOURCE {hottBattery2SourceVar.get()}\n")
83 if hottMainBatterySourceVar.get() != 'Not sent':
84 f.write(f"#define MAIN_BATTERY_SOURCE {hottMainBatterySourceVar.get()}\n")
85 if hottT1SourceVar.get() != 'Not sent':
86 f.write(f"#define TEMPERATURE_1_SOURCE {hottT1SourceVar.get()}\n")
87 if hottT2SourceVar.get() != 'Not sent':
88 f.write(f"#define TEMPERATURE_2_SOURCE {hottT2SourceVar.get()}\n")
90 if protocolVar.get() == 'MULTIPLEX':
91 if (multiplexLine1Var.get() != 'Not sent') or (multiplexLine2Var.get() != 'Not sent') or (multiplexLine3Var.get() != 'Not sent') or \
92 (multiplexLine4Var.get() != 'Not sent') or (multiplexLine5Var.get() != 'Not sent') or (multiplexLine6Var.get() != 'Not sent'):
93 f.write("#define SETUP_MULTIPLEX_DATA_TO_SEND ")
94 firstLine = True
95 if multiplexLine1Var.get() != 'Not sent':
96 firstLine = False
97 f.write("\\")
98 f.write(f"\n 1, {multiplexLine1Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
99 if multiplexLine2Var.get() != 'Not sent':
100 if firstLine == False:
101 f.write(" , ")
102 else:
103 firstLine = False
104 f.write("\\")
105 f.write(f"\n 2, {multiplexLine2Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
106 if multiplexLine3Var.get() != 'Not sent':
107 if firstLine == False:
108 f.write(" , ")
109 else:
110 firstLine = False
111 f.write("\\")
112 f.write(f"\n 3, {multiplexLine3Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
113 if multiplexLine4Var.get() != 'Not sent':
114 if firstLine == False:
115 f.write(" , ")
116 else:
117 firstLine = False
118 f.write("\\")
119 f.write(f"\n 4, {multiplexLine4Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
120 if multiplexLine5Var.get() != 'Not sent':
121 if firstLine == False:
122 f.write(" , ")
123 else:
124 firstLine = False
125 f.write("\\")
126 f.write(f"\n 5, {multiplexLine5Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
127 if multiplexLine6Var.get() != 'Not sent':
128 if firstLine == False:
129 f.write(" , ")
130 else:
131 firstLine = False
132 f.write("\\")
133 f.write(f"\n 6, {multiplexLine6Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
134 if multiplexLine7Var.get() != 'Not sent':
135 if firstLine == False:
136 f.write(" , ")
137 else:
138 firstLine = False
139 f.write("\\")
140 f.write(f"\n 7, {multiplexLine7Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
141 if multiplexLine8Var.get() != 'Not sent':
142 if firstLine == False:
143 f.write(" , ")
144 else:
145 firstLine = False
146 f.write("\\")
147 f.write(f"\n 8, {multiplexLine8Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
148 if multiplexLine9Var.get() != 'Not sent':
149 if firstLine == False:
150 f.write(" , ")
151 else:
152 firstLine = False
153 f.write("\\")
154 f.write(f"\n 9, {multiplexLine9Var.get()} , 1 , 1 , 0 , -16384 , 16383 ")
155 f.write("\n")
156 else:
157 messagebox.showwarning("Warning","Generated files will be unvalid:\n for Multiplex protocol, you must specify the field(s) to be sent")
159 if addFieldsExist.get() == "On":
160 if fillTest1VarioTemperatureVar.get() == "On":
161 fa.write("\n#define FILL_TEST_1_VARIO_TEMPERATURE\n")
162 if fillTest3ExpectedAltitudeVar.get() == "On":
163 fa.write("\n#define FILL_TEST_3_WITH_EXPECTED_ALT\n")
164 fa.write(f"\n#define EXPECTED_ALT_AT_SEC {str(expAltTimeVar.get())}\n")
165 if fillTest123LinearAccVar.get() == "On":
166 fa.write("\n#define FILL_TEST_1_2_3_WITH_LINEAR_ACC\n")
167 if fillTest12VspeedAltVar.get() == "On":
168 fa.write("\n#define FILL_TEST_1_2_WITH_VSPEED_AND_ALT_FROM_SECOND_VARIO\n")
169 if fillTest1DteVar.get() == "On":
170 fa.write("\n#define FILL_TEST_1_WITH_DTE\n")
171 if fillTest2PpmAirspeedCompVar.get() == "On":
172 fa.write("\n#define FILL_TEST_2_WITH_PPM_AIRSPEED_COMPENSATION\n")
173 if fillTest1YawRateVar.get() == "On":
174 fa.write("\n#define FILL_TEST_1_WITH_YAWRATE\n")
175 if fillTest1HeadingVar.get() == "On":
176 fa.write("\n#define FILL_TEST1_WITH_HEADING_FROM_MAGNETOMETER\n")
177 if fillTest123FlowVar.get() == "On":
178 fa.write("\n#define FILL_TEST_1_2_3_WITH_FLOW_SENSOR_CONSUMPTION\n")
179 if fillTest1GpsNbrSatVar.get() == "On":
180 fa.write("\n#define FILL_TEST1_WITH_GPS_NUMBER_OF_SAT\n")
181 if fillTest2GpsHdopVar.get() == "On":
182 fa.write("\n#define FILL_TEST2_WITH_GPS_HDOP\n")
184 if ppmExist.get() == "On":
185 if ppmTypeVar.get() == 'Rx chanel':
186 fa.write(f"\n#define PIN_PPM {str(ppmPinVar.get())}\n")
187 fa.write(f"#define PPM_MIN_100 {str(ppmForMin100Var.get())}\n")
188 fa.write(f"#define PPM_PLUS_100 {str(ppmForPlus100Var.get())}\n")
189 else:
190 fa.write("\n#define PPM_VIA_SPORT \n")
192 if varioExist.get() == "On":
193 f.write(f"#define FIRST_BARO_SENSOR_USE {varioTypeVar.get()}\n")
194 f.write(f"#define VSPEED_SOURCE {varioSourceVar.get()}\n")
195 if secondBaroExist.get() == 'On':
196 fa.write("\n#define SECOND_BARO_SENSOR_USE MS5611\n")
197 else:
198 fa.write("\n#define SECOND_BARO_SENSOR_USE NO_BARO\n")
199 fa.write("\n#define SENSITIVITY_MIN 80\n")
200 fa.write("#define SENSITIVITY_MAX 300\n")
201 fa.write("#define SENSITIVITY_MIN_AT 100\n")
202 fa.write("#define SENSITIVITY_MAX_AT 1000\n")
203 if ppmExist.get() == "On":
204 fa.write("\n#define SENSITIVITY_MIN_AT_PPM 10\n")
205 fa.write("#define SENSITIVITY_MAX_AT_PPM 40\n")
206 fa.write("#define SENSITIVITY_PPM_MIN 20\n")
207 fa.write("#define SENSITIVITY_PPM_MAX 100\n")
208 fa.write(f"\n#define VARIOHYSTERESIS {str(varioHysteresisVar.get())}\n")
209 if analogVarioExist.get() == "On":
210 fa.write(f"\n#define PIN_ANALOG_VSPEED {varioAnalogPinVar.get()}\n")
211 fa.write(f"#define ANALOG_VSPEED_MIN {varioAnalogMinVar.get()}\n")
212 fa.write(f"#define ANALOG_VSPEED_MAX {varioAnalogMaxVar.get()}\n")
213 else:
214 f.write("#define FIRST_BARO_SENSOR_USE NO_BARO\n")
216 if airspeedExist.get() == "On":
217 f.write(f"#define AIRSPEED_SENSOR_USE {airspeedTypeVar.get()}\n")
218 if airspeedAtSea15CVar == "On":
219 fa.write("\n#define AIRSPEED_AT_SEA_LEVEL_AND_15C\n")
220 if airspeedInKmhVar == "On":
221 fa.write("\n#define AIRSPEED_IN_KMH\n")
222 fa.write(f"\n#define AIRSPEED_RESET_AT_PPM {airspeedResetAtPpmVar.get()}\n")
223 fa.write(f"\n#define COMPENSATION_MIN_AT_PPM {airspeedCompMinAtPpmVar.get()}\n")
224 fa.write(f"\n#define COMPENSATION_MAX_AT_PPM {airspeedCompMaxAtPpmVar.get()}\n")
225 fa.write(f"\n#define COMPENSATION_PPM_MIN {airspeedCompMinVar.get()}\n")
226 fa.write(f"\n#define COMPENSATION_PPM_MAX {airspeedCompMaxVar.get()}\n")
227 else:
228 f.write("\n#define AIRSPEED_SENSOR_USE NO_AIRSPEED\n")
230 if voltageExist.get() == "On":
231 f.write("\n#define ARDUINO_MEASURES_VOLTAGES YES\n")
232 f.write(f"#define NUMBEROFCELLS {voltNumberOfCellsVar.get()}\n")
233 if voltReferenceVar.get() == "Internal":
234 fa.write("\n#define USE_INTERNAL_REFERENCE\n")
235 elif voltReferenceVar.get() == "External":
236 fa.write("\n#define USE_EXTERNAL_REFERENCE\n")
237 fa.write(f"\n#define REFERENCE_VOLTAGE {str(voltRefValueVar.get())}\n")
238 else:
239 fa.write(f"\n#define REFERENCE_VOLTAGE {str(voltRefValueVar.get())}\n")
240 fa.write(f"\n#define PIN_VOLTAGE ")
241 if volt1Exist.get() == 'On':
242 fa.write(f" {volt1PinVar.get()} , ")
243 else:
244 fa.write("8 , ")
245 if volt2Exist.get() == 'On':
246 fa.write(f" {volt2PinVar.get()} , ")
247 else:
248 fa.write("8 , ")
249 if volt3Exist.get() == 'On':
250 fa.write(f" {volt3PinVar.get()} , ")
251 else:
252 fa.write("8 , ")
253 if volt4Exist.get() == 'On':
254 fa.write(f" {volt4PinVar.get()} , ")
255 else:
256 fa.write("8 , ")
257 if volt5Exist.get() == 'On':
258 fa.write(f" {volt5PinVar.get()} , ")
259 else:
260 fa.write("8 , ")
261 if volt6Exist.get() == 'On':
262 fa.write(f" {volt6PinVar.get()} \n")
263 else:
264 fa.write("8\n")
265 fa.write((f"#define RESISTOR_TO_GROUND {volt1RgVar.get()} , " +
266 f"{volt2RgVar.get()} , {volt3RgVar.get()} , {volt4RgVar.get()} , " +
267 f"{volt5RgVar.get()} , {volt6RgVar.get()}\n"))
268 fa.write((f"#define RESISTOR_TO_VOLTAGE {volt1RvVar.get()} , " +
269 f"{volt2RvVar.get()} , {volt3RvVar.get()} , {volt4RvVar.get()} , " +
270 f"{volt5RvVar.get()} , {volt6RvVar.get()}\n"))
271 fa.write((f"#define OFFSET_VOLTAGE {volt1OffsetVar.get()} , " +
272 f"{volt2OffsetVar.get()} , {volt3OffsetVar.get()} , {volt4OffsetVar.get()} , " +
273 f"{volt5OffsetVar.get()} , {volt6OffsetVar.get()}\n"))
274 fa.write((f"#define SCALE_VOLTAGE {volt1ScaleVar.get()} , " +
275 f"{volt2ScaleVar.get()} , {volt3ScaleVar.get()} , {volt4ScaleVar.get()} , " +
276 f"{volt5ScaleVar.get()} , {volt6ScaleVar.get()}\n"))
277 else:
278 f.write("\n#define ARDUINO_MEASURES_VOLTAGES NO\n")
280 if currentExist.get() == "On":
281 f.write("\n#define ARDUINO_MEASURES_A_CURRENT YES\n")
282 fa.write(f"\n#define PIN_CURRENTSENSOR {currentPinVar.get()}\n")
283 fa.write(f"#define MVOLT_AT_ZERO_AMP {str(currentMvoltAt0Var.get())}\n")
284 fa.write(f"#define MVOLT_PER_AMP {str(currentMvoltPerAmpVar.get())}\n")
285 fa.write(f"#define RESISTOR_TO_GROUND_FOR_CURRENT {str(currentRgVar.get())}\n")
286 fa.write(f"#define RESISTOR_TO_CURRENT_SENSOR {str(currentRcVar.get())}\n")
287 else:
288 f.write("\n#define ARDUINO_MEASURES_A_CURRENT NO\n")
290 if adcExist.get() == "On":
291 f.write("\n#define AN_ADS1115_IS_CONNECTED YES\n")
292 else:
293 f.write("\n#define AN_ADS1115_IS_CONNECTED NO\n")
295 if rpmExist.get() == "On":
296 f.write("\n#define CALCULATE_RPM YES\n")
297 fa.write(f"\n#define PULSES_PER_ROTATION {pulsesPerRotationVar.get()}\n")
298 else:
299 f.write("\n#define CALCULATE_RPM NO\n")
301 f.write("\n#define SAVE_TO_EEPROM NO\n")
303 if gpsExist.get() == "On":
304 f.write("\n#define A_GPS_IS_CONNECTED YES\n")
305 if gps3dExist.get() == 'On':
306 fa.write("\n#define GPS_SPEED_3D\n")
307 fa.write(f"#define GPS_REFRESH_RATE {gpsRateVar.get()}\n")
308 else:
309 f.write("\n#define A_GPS_IS_CONNECTED NO\n")
311 if imuExist.get() == "On":
312 f.write("\n#define A_MPU6050_IS_CONNECTED YES\n")
313 else:
314 f.write("\n#define A_MPU6050_IS_CONNECTED NO\n")
316 if magnetExist.get() == "On":
317 f.write("\n#define CALCULATE_YAW_WITH_HMC5883 YES\n")
318 else:
319 f.write("\n#define CALCULATE_YAW_WITH_HMC5883 NO\n")
321 if flowExist.get() == "On":
322 f.write("\n#define A_FLOW_SENSOR_IS_CONNECTED YES\n")
323 else:
324 f.write("\n#define A_FLOW_SENSOR_IS_CONNECTED NO\n")
326 if locatorExist.get() == "On":
327 f.write("\n#define A_LOCATOR_IS_CONNECTED YES\n")
328 else:
329 f.write("\n#define A_LOCATOR_IS_CONNECTED NO\n")
333 f.write("\n#endif\n")
334 fa.write("\n#endif\n")
335 f.close()
336 fa.close()
337 messagebox.showinfo("oXs configurator", "Config files advanced and basic have been created")
339 def uploadConfig():
340 from oxsVoltage import voltReferenceChanged
341 print("Read config")
342 #global configUploadFileName
343 #configUploadFileName = filedialog.askopenfilename(initialdir="C:/Data/",
344 configUploadFileName = filedialog.askopenfilename(\
345 filetypes =(("Ini files", "*.ini"),("All files","*.*")),
346 title = "Choose a file."
348 #config.read('config.ini')
349 config.read(configUploadFileName)
350 ppmExist.set(value= config.get('Main', 'ppmExist'))
351 ppmChanged()
352 varioExist.set(value= config.get('Main', 'varioExist'))
353 varioChanged()
354 voltageExist.set(value = config.get("Main", "voltageExist"))
355 voltageChanged()
356 currentExist.set(value = config.get("Main", "currentExist"))
357 currentChanged()
358 gpsExist.set(value = config.get("Main", "gpsExist"))
359 gpsChanged()
360 airspeedExist.set(value= config.get("Main", "airspeedExist"))
361 airspeedChanged()
362 rpmExist.set(value= config.get("Main", "rpmExist"))
363 rpmChanged()
364 imuExist.set(value= config.get("Main", "imuExist"))
365 imuChanged()
366 magnetExist.set(value= config.get("Main", "magnetExist"))
367 magnetChanged()
368 flowExist.set(value= config.get("Main", "flowExist"))
369 flowChanged()
370 adcExist.set(value= config.get("Main", "adcExist"))
371 adcChanged()
372 sequenceExist.set(value= config.get("Main", "sequenceExist"))
373 sequenceChanged()
374 addFieldsExist.set(value= config.get("Main", "addFieldsExist"))
375 addFieldsChanged()
376 protocolVar.set(value= config.get("Main", "protocolVar"))
377 protocolChanged()
379 ppmTypeVar.set(value= config.get("Ppm", "ppmTypeVar"))
380 ppmTypeChanged()
381 ppmPinVar.set(value= config.getint("Ppm", "ppmPinVar"))
382 ppmForMin100Var.set(value= config.getint("Ppm", "ppmForMin100Var"))
383 ppmForPlus100Var.set(value= config.getint("Ppm", "ppmForPlus100Var"))
385 varioTypeVar.set(value= config.get("Vario", "varioTypeVar"))
386 secondBaroExist.set(value= config.get("Vario", "secondBaroExist"))
387 varioSourceVar.set(value= config.get("Vario", "varioSourceVar"))
388 varioHysteresisVar.set(value= config.getint("Vario", "varioHysteresisVar"))
389 analogVarioExist.set(value= config.get("Vario", "analogVarioExist"))
390 analogVarioChanged()
391 varioAnalogPinVar.set(value= config.get("Vario", "varioAnalogPinVar"))
392 varioAnalogMinVar.set(value= config.getfloat("Vario", "varioAnalogMinVar"))
393 varioAnalogMaxVar.set(value= config.getfloat("Vario", "varioAnalogMaxVar"))
395 airspeedTypeVar.set(value= config.get("Airspeed", "airspeedTypeVar"))
396 airspeedAtSea15CVar.set(value= config.get("Airspeed", "airspeedAtSea15CVar"))
397 airspeedInKmhVar.set(value= config.get("Airspeed", "airspeedInKmhVar"))
398 airspeedResetAtPpmVar.set(value= config.getint("Airspeed", "airspeedResetAtPpmVar"))
399 airspeedCompMinAtPpmVar.set(value= config.getint("Airspeed", "airspeedCompMinAtPpmVar"))
400 airspeedCompMaxAtPpmVar.set(value= config.getint("Airspeed", "airspeedCompMaxAtPpmVar"))
401 airspeedCompMinVar.set(value= config.getint("Airspeed", "airspeedCompMinVar"))
402 airspeedCompMaxVar.set(value= config.getint("Airspeed", "airspeedCompMaxVar"))
404 volt1Exist.set(value= config.get("Voltage", "volt1Exist"))
405 volt2Exist.set(value= config.get("Voltage", "volt2Exist"))
406 volt3Exist.set(value= config.get("Voltage", "volt3Exist"))
407 volt4Exist.set(value= config.get("Voltage", "volt4Exist"))
408 volt5Exist.set(value= config.get("Voltage", "volt5Exist"))
409 volt6Exist.set(value= config.get("Voltage", "volt6Exist"))
410 volt1PinVar.set(value= config.get("Voltage", "volt1PinVar"))
411 volt2PinVar.set(value= config.get("Voltage", "volt2PinVar"))
412 volt3PinVar.set(value= config.get("Voltage", "volt3PinVar"))
413 volt4PinVar.set(value= config.get("Voltage", "volt4PinVar"))
414 volt5PinVar.set(value= config.get("Voltage", "volt5PinVar"))
415 volt6PinVar.set(value= config.get("Voltage", "volt6PinVar"))
416 volt1RgVar.set(value= config.getfloat("Voltage", "volt1RgVar"))
417 volt2RgVar.set(value= config.getfloat("Voltage", "volt2RgVar"))
418 volt3RgVar.set(value= config.getfloat("Voltage", "volt3RgVar"))
419 volt4RgVar.set(value= config.getfloat("Voltage", "volt4RgVar"))
420 volt5RgVar.set(value= config.getfloat("Voltage", "volt5RgVar"))
421 volt6RgVar.set(value= config.getfloat("Voltage", "volt6RgVar"))
422 volt1RvVar.set(value= config.getfloat("Voltage", "volt1RvVar"))
423 volt2RvVar.set(value= config.getfloat("Voltage", "volt2RvVar"))
424 volt3RvVar.set(value= config.getfloat("Voltage", "volt3RvVar"))
425 volt4RvVar.set(value= config.getfloat("Voltage", "volt4RvVar"))
426 volt5RvVar.set(value= config.getfloat("Voltage", "volt5RvVar"))
427 volt6RvVar.set(value= config.getfloat("Voltage", "volt6RvVar"))
428 volt1ScaleVar.set(value= config.getfloat("Voltage", "volt1ScaleVar"))
429 volt2ScaleVar.set(value= config.getfloat("Voltage", "volt2ScaleVar"))
430 volt3ScaleVar.set(value= config.getfloat("Voltage", "volt3ScaleVar"))
431 volt4ScaleVar.set(value= config.getfloat("Voltage", "volt4ScaleVar"))
432 volt5ScaleVar.set(value= config.getfloat("Voltage", "volt5ScaleVar"))
433 volt5ScaleVar.set(value= config.getfloat("Voltage", "volt6ScaleVar"))
434 volt1OffsetVar.set(value= config.getfloat("Voltage", "volt1OffsetVar"))
435 volt2OffsetVar.set(value= config.getfloat("Voltage", "volt2OffsetVar"))
436 volt3OffsetVar.set(value= config.getfloat("Voltage", "volt3OffsetVar"))
437 volt4OffsetVar.set(value= config.getfloat("Voltage", "volt4OffsetVar"))
438 volt5OffsetVar.set(value= config.getfloat("Voltage", "volt5OffsetVar"))
439 volt6OffsetVar.set(value= config.getfloat("Voltage", "volt6OffsetVar"))
440 voltReferenceVar.set(value= config.get("Voltage", "voltReferenceVar"))
441 voltRefValueVar.set(value= config.getfloat("Voltage", "voltRefValueVar"))
442 voltReferenceChanged()
445 currentPinVar.set(value= config.get("Current", "currentPinVar"))
446 currentMvoltAt0Var.set(value= config.getfloat("Current", "currentMvoltAt0Var"))
447 currentMvoltPerAmpVar.set(value= config.getfloat("Current", "currentMvoltPerAmpVar"))
448 currentRgVar.set(value= config.getfloat("Current", "currentRgVar"))
449 currentRcVar.set(value= config.getfloat("Current", "currentRcVar"))
451 pulsesPerRotationVar.set(value=config.get("Rpm","pulsesPerRotationVar"))
453 gps3dExist.set(value= config.get("Gps", "gps3dexist"))
454 gpsRateVar.set(value= config.getint("Gps", "gpsratevar"))
455 fillTest1VarioTemperatureVar.set(value= config.get("AddFields", "fillTest1VarioTemperatureVar"))
456 fillTest3ExpectedAltitudeVar.set(value= config.get("AddFields", "fillTest3ExpectedAltitudeVar"))
457 fillTest3ExpectedAltitudeChanged()
458 expAltTimeVar.set(value= config.getfloat("AddFields", "expAltTimeVar"))
459 fillTest123LinearAccVar.set(value= config.get("AddFields", "fillTest123LinearAccVar"))
460 fillTest12VspeedAltVar.set(value= config.get("AddFields", "fillTest12VspeedAltVar"))
461 fillTest1DteVar.set(value= config.get("AddFields", "fillTest1DteVar"))
462 fillTest2PpmAirspeedCompVar.set(value= config.get("AddFields", "fillTest2PpmAirspeedCompVar"))
463 fillTest1YawRateVar.set(value= config.get("AddFields", "fillTest1YawRateVar"))
464 fillTest1HeadingVar.set(value= config.get("AddFields", "fillTest1HeadingVar"))
465 fillTest123FlowVar.set(value= config.get("AddFields", "fillTest123FlowVar"))
466 fillTest1GpsNbrSatVar.set(value= config.get("AddFields", "fillTest1GpsNbrSatVar"))
467 fillTest2GpsHdopVar.set(value= config.get("AddFields", "fillTest2GpsHdopVar"))
469 frskyVfasVar.set(value= config.get("Frsky", "frskyVfasVar"))
470 frskyFuelVar.set(value= config.get("Frsky", "frskyFuelVar"))
471 frskyA3Var.set(value= config.get("Frsky", "frskyA3Var"))
472 frskyA4Var.set(value= config.get("Frsky", "frskyA4Var"))
473 frskyAccxVar.set(value= config.get("Frsky", "frskyAccxVar"))
474 frskyAccyVar.set(value= config.get("Frsky", "frskyAccyVar"))
475 frskyAcczVar.set(value= config.get("Frsky", "frskyAcczVar"))
476 frskyT1Var.set(value= config.get("Frsky", "frskyT1Var"))
477 frskyT2Var.set(value= config.get("Frsky", "frskyT2Var"))
479 multiplexLine1Var.set(value= config.get("Multiplex", "multiplexLine1Var"))
480 multiplexLine2Var.set(value= config.get("Multiplex", "multiplexLine2Var"))
481 multiplexLine3Var.set(value= config.get("Multiplex", "multiplexLine3Var"))
482 multiplexLine4Var.set(value= config.get("Multiplex", "multiplexLine4Var"))
483 multiplexLine5Var.set(value= config.get("Multiplex", "multiplexLine5Var"))
484 multiplexLine6Var.set(value= config.get("Multiplex", "multiplexLine6Var"))
485 multiplexLine7Var.set(value= config.get("Multiplex", "multiplexLine7Var"))
486 multiplexLine8Var.set(value= config.get("Multiplex", "multiplexLine8Var"))
487 multiplexLine9Var.set(value= config.get("Multiplex", "multiplexLine9Var"))
489 hottBattery1SourceVar.set(value= config.get("Hott", "hottBattery1SourceVar"))
490 hottBattery2SourceVar.set(value= config.get("Hott", "hottBattery2SourceVar"))
491 hottCellUndervoltageVar.set(value= config.getint("Hott", "hottCellUndervoltageVar"))
492 hottMainBatterySourceVar.set(value= config.get("Hott", "hottMainBatterySourceVar"))
493 hottT1SourceVar.set(value= config.get("Hott", "hottT1SourceVar"))
494 hottT2SourceVar.set(value= config.get("Hott", "hottT2SourceVar"))
496 jetiVoltageSourceVar.set(value= config.get("Jeti", "jetiVoltageSourceVar"))
497 jetiTemperatureSourceVar.set(value= config.get("Jeti", "jetiTemperatureSourceVar"))
499 def saveConfig():
500 config.set("Main", "ppmExist", ppmExist.get())
501 config.set("Main", "varioExist", varioExist.get())
502 config.set("Main", "voltageExist", voltageExist.get())
503 config.set("Main", "currentExist", currentExist.get())
504 config.set("Main", "gpsExist", gpsExist.get())
505 config.set("Main", "airspeedExist", airspeedExist.get())
506 config.set("Main", "rpmExist", rpmExist.get())
507 config.set("Main", "imuExist", imuExist.get())
508 config.set("Main", "magnetExist", magnetExist.get())
509 config.set("Main", "flowExist", flowExist.get())
510 config.set("Main", "adcExist", adcExist.get())
511 config.set("Main", "sequenceExist", sequenceExist.get())
512 config.set("Main", "addFieldsExist", addFieldsExist.get())
513 config.set("Main", "protocolVar", protocolVar.get())
515 config.set("Ppm", "ppmTypeVar", ppmTypeVar.get())
516 config.set("Ppm", "ppmPinVar", str(ppmPinVar.get()))
517 config.set("Ppm", "ppmForMin100Var", str(ppmForMin100Var.get()))
518 config.set("Ppm", "ppmForPlus100Var", str(ppmForPlus100Var.get()))
520 config.set("Vario", "varioTypeVar", varioTypeVar.get())
521 config.set("Vario", "secondBaroExist", secondBaroExist.get())
522 config.set("Vario", "varioSourceVar", varioSourceVar.get())
523 config.set("Vario", "varioHysteresisVar", str(varioHysteresisVar.get()))
524 config.set("Vario", "analogVarioExist", analogVarioExist.get())
525 config.set("Vario", "varioAnalogPinVar", varioAnalogPinVar.get())
526 config.set("Vario", "varioAnalogMinVar", str(varioAnalogMinVar.get()))
527 config.set("Vario", "varioAnalogMaxVar", str(varioAnalogMaxVar.get()))
529 config.set("Airspeed", "airspeedTypeVar", airspeedTypeVar.get())
530 config.set("Airspeed", "airspeedAtSea15CVar", airspeedAtSea15CVar.get())
531 config.set("Airspeed", "airspeedInKmhVar", airspeedInKmhVar.get())
532 config.set("Airspeed", "airspeedResetAtPpmVar", str(airspeedResetAtPpmVar.get()))
533 config.set("Airspeed", "airspeedCompMinAtPpmVar", str(airspeedCompMinAtPpmVar.get()))
534 config.set("Airspeed", "airspeedCompMaxAtPpmVar", str(airspeedCompMaxAtPpmVar.get()))
535 config.set("Airspeed", "airspeedCompMinVar", str(airspeedCompMinVar.get()))
536 config.set("Airspeed", "airspeedCompMaxVar", str(airspeedCompMaxVar.get()))
538 config.set("Voltage", "volt1Exist", volt1Exist.get())
539 config.set("Voltage", "volt2Exist", volt2Exist.get())
540 config.set("Voltage", "volt3Exist", volt3Exist.get())
541 config.set("Voltage", "volt4Exist", volt4Exist.get())
542 config.set("Voltage", "volt5Exist", volt5Exist.get())
543 config.set("Voltage", "volt6Exist", volt6Exist.get())
544 config.set("Voltage", "volt1PinVar", volt1PinVar.get())
545 config.set("Voltage", "volt2PinVar", volt2PinVar.get())
546 config.set("Voltage", "volt3PinVar", volt3PinVar.get())
547 config.set("Voltage", "volt4PinVar", volt4PinVar.get())
548 config.set("Voltage", "volt5PinVar", volt5PinVar.get())
549 config.set("Voltage", "volt6PinVar", volt6PinVar.get())
550 config.set("Voltage", "volt1RgVar", str(volt1RgVar.get()))
551 config.set("Voltage", "volt2RgVar", str(volt2RgVar.get()))
552 config.set("Voltage", "volt3RgVar", str(volt3RgVar.get()))
553 config.set("Voltage", "volt4RgVar", str(volt4RgVar.get()))
554 config.set("Voltage", "volt5RgVar", str(volt5RgVar.get()))
555 config.set("Voltage", "volt6RgVar", str(volt6RgVar.get()))
556 config.set("Voltage", "volt1RvVar", str(volt1RvVar.get()))
557 config.set("Voltage", "volt2RvVar", str(volt2RvVar.get()))
558 config.set("Voltage", "volt3RvVar", str(volt3RvVar.get()))
559 config.set("Voltage", "volt4RvVar", str(volt4RvVar.get()))
560 config.set("Voltage", "volt5RvVar", str(volt5RvVar.get()))
561 config.set("Voltage", "volt6RvVar", str(volt6RvVar.get()))
562 config.set("Voltage", "volt1ScaleVar", str(volt1ScaleVar.get()))
563 config.set("Voltage", "volt2ScaleVar", str(volt2ScaleVar.get()))
564 config.set("Voltage", "volt3ScaleVar", str(volt3ScaleVar.get()))
565 config.set("Voltage", "volt4ScaleVar", str(volt4ScaleVar.get()))
566 config.set("Voltage", "volt5ScaleVar", str(volt5ScaleVar.get()))
567 config.set("Voltage", "volt6ScaleVar", str(volt6ScaleVar.get()))
568 config.set("Voltage", "volt1OffsetVar", str(volt1OffsetVar.get()))
569 config.set("Voltage", "volt2OffsetVar", str(volt2OffsetVar.get()))
570 config.set("Voltage", "volt3OffsetVar", str(volt3OffsetVar.get()))
571 config.set("Voltage", "volt4OffsetVar", str(volt4OffsetVar.get()))
572 config.set("Voltage", "volt5OffsetVar", str(volt5OffsetVar.get()))
573 config.set("Voltage", "volt6OffsetVar", str(volt6OffsetVar.get()))
574 config.set("Voltage", "voltReferenceVar", voltReferenceVar.get())
575 config.set("Voltage", "voltRefValueVar", str(voltRefValueVar.get()))
577 config.set("Current", "currentPinVar", currentPinVar.get())
578 config.set("Current", "currentMvoltAt0Var", str(currentMvoltAt0Var.get()))
579 config.set("Current", "currentMvoltPerAmpVar", str(currentMvoltPerAmpVar.get()))
580 config.set("Current", "currentRgVar", str(currentRgVar.get()))
581 config.set("Current", "currentRcVar", str(currentRcVar.get()))
583 config.set("Rpm", "pulsesPerRotationVar", str(pulsesPerRotationVar.get()))
585 config.set("Gps", "gps3dExist", gps3dExist.get())
586 config.set("Gps", "gpsRateVar", gpsRateVar.get())
588 config.set("AddFields", "fillTest1VarioTemperatureVar", fillTest1VarioTemperatureVar.get())
589 config.set("AddFields", "fillTest3ExpectedAltitudeVar", fillTest3ExpectedAltitudeVar.get())
590 config.set("AddFields", "expAltTimeVar", str(expAltTimeVar.get()))
591 config.set("AddFields", "fillTest123LinearAccVar", fillTest123LinearAccVar.get())
592 config.set("AddFields", "fillTest12VspeedAltVar", fillTest12VspeedAltVar.get())
593 config.set("AddFields", "fillTest1DteVar", fillTest1DteVar.get())
594 config.set("AddFields", "fillTest2PpmAirspeedCompVar", fillTest2PpmAirspeedCompVar.get())
595 config.set("AddFields", "fillTest1YawRateVar", fillTest1YawRateVar.get())
596 config.set("AddFields", "fillTest1HeadingVar", fillTest1HeadingVar.get())
597 config.set("AddFields", "fillTest123FlowVar", fillTest123FlowVar.get())
598 config.set("AddFields", "fillTest1GpsNbrSatVar", fillTest1GpsNbrSatVar.get())
599 config.set("AddFields", "fillTest2GpsHdopVar", fillTest2GpsHdopVar.get())
601 config.set("Frsky", "frskyVfasVar", frskyVfasVar.get())
602 config.set("Frsky", "frskyFuelVar", frskyFuelVar.get())
603 config.set("Frsky", "frskyA3Var", frskyA3Var.get())
604 config.set("Frsky", "frskyA4Var", frskyA4Var.get())
605 config.set("Frsky", "frskyAccxVar", frskyAccxVar.get())
606 config.set("Frsky", "frskyAccyVar", frskyAccyVar.get())
607 config.set("Frsky", "frskyAcczVar", frskyAcczVar.get())
608 config.set("Frsky", "frskyT1Var", frskyT1Var.get())
609 config.set("Frsky", "frskyT2Var", frskyT2Var.get())
611 config.set("Multiplex", "multiplexLine1Var", multiplexLine1Var.get())
612 config.set("Multiplex", "multiplexLine2Var", multiplexLine2Var.get())
613 config.set("Multiplex", "multiplexLine3Var", multiplexLine3Var.get())
614 config.set("Multiplex", "multiplexLine4Var", multiplexLine4Var.get())
615 config.set("Multiplex", "multiplexLine5Var", multiplexLine5Var.get())
616 config.set("Multiplex", "multiplexLine6Var", multiplexLine6Var.get())
617 config.set("Multiplex", "multiplexLine7Var", multiplexLine7Var.get())
618 config.set("Multiplex", "multiplexLine8Var", multiplexLine8Var.get())
619 config.set("Multiplex", "multiplexLine9Var", multiplexLine9Var.get())
621 config.set("Hott", "hottBattery1SourceVar", hottBattery1SourceVar.get())
622 config.set("Hott", "hottBattery2SourceVar", hottBattery2SourceVar.get())
623 config.set("Hott", "hottCellUndervoltageVar", str(hottCellUndervoltageVar.get()))
624 config.set("Hott", "hottMainBatterySourceVar", hottMainBatterySourceVar.get())
625 config.set("Hott", "hottT1SourceVar", hottT1SourceVar.get())
626 config.set("Hott", "hottT2SourceVar", hottT2SourceVar.get())
628 config.set("Jeti", "jetiVoltageSourceVar", jetiVoltageSourceVar.get())
629 config.set("Jeti", "jetiTemperatureSourceVar", jetiTemperatureSourceVar.get())
631 configSaveFileName = filedialog.asksaveasfilename(title="Save as...", defaultextension="*.ini",\
632 filetypes=[("Ini files","*.ini"),("All files", "*")], initialfile=configUploadFileName)
633 print(configSaveFileName)
634 config.write(open(configSaveFileName ,'w'))
635 #configUploadFileName = configSaveFileName
636 #config.write(open('config.ini','w'))
638 def protocolChanged(*arg):
639 #print(protocolVar.get() )
640 nb.tab(15, state="hidden")
641 nb.tab(16, state="hidden")
642 nb.tab(17, state="hidden")
643 nb.tab(18, state="hidden")
644 if protocolVar.get() == "FRSKY_SPORT" or protocolVar.get() == "FRSKY_HUB" or protocolVar.get() == "FRSKY_SPORT_HUB" :
645 nb.tab(15, state="normal")
646 elif protocolVar.get() == "JETI":
647 nb.tab(16, state="normal")
648 elif protocolVar.get() == "HOTT":
649 nb.tab(17, state="normal")
650 elif protocolVar.get() == "MULTIPLEX":
651 nb.tab(18, state="normal")
653 def ppmChanged():
654 if ppmExist.get() == 'On':
655 nb.tab(1, state="normal")
656 else:
657 nb.tab(1, state="hidden")
658 def ppmTypeChanged(*arg):
659 if ppmTypeVar.get() == 'Rx chanel':
660 fPpmType.grid(row=8)
661 else:
662 fPpmType.grid_remove()
663 def varioChanged():
664 if varioExist.get() == 'On':
665 nb.tab(2, state="normal")
666 else:
667 nb.tab(2, state="hidden")
668 def voltageChanged():
669 if voltageExist.get() == 'On':
670 nb.tab(3, state="normal")
671 else:
672 nb.tab(3, state="hidden")
673 def currentChanged():
674 if currentExist.get() == 'On':
675 nb.tab(4, state="normal")
676 else:
677 nb.tab(4, state="hidden")
678 def gpsChanged():
679 if gpsExist.get() == 'On':
680 nb.tab(5, state="normal")
681 else:
682 nb.tab(5, state="hidden")
683 def airspeedChanged():
684 if airspeedExist.get() == 'On':
685 nb.tab(6, state="normal")
686 else:
687 nb.tab(6, state="hidden")
688 def rpmChanged():
689 if rpmExist.get() == 'On':
690 nb.tab(7, state="normal")
691 else:
692 nb.tab(7, state="hidden")
693 def imuChanged():
694 if imuExist.get() == 'On':
695 nb.tab(8, state="normal")
696 else:
697 nb.tab(8, state="hidden")
698 def magnetChanged():
699 if magnetExist.get() == 'On':
700 nb.tab(9, state="normal")
701 else:
702 nb.tab(9, state="hidden")
703 def flowChanged():
704 if flowExist.get() == 'On':
705 nb.tab(10, state="normal")
706 else:
707 nb.tab(10, state="hidden")
708 def adcChanged():
709 if adcExist.get() == 'On':
710 nb.tab(11, state="normal")
711 else:
712 nb.tab(11, state="hidden")
713 def locatorChanged():
714 if locatorExist.get() == 'On':
715 nb.tab(12, state="normal")
716 else:
717 nb.tab(12, state="hidden")
718 def sequenceChanged():
719 if sequenceExist.get() == 'On':
720 nb.tab(13, state="normal")
721 else:
722 nb.tab(13, state="hidden")
723 def addFieldsChanged():
724 if addFieldsExist.get() == 'On':
725 nb.tab(14, state="normal")
726 else:
727 nb.tab(14, state="hidden")
729 def fillTest3ExpectedAltitudeChanged():
730 if fillTest3ExpectedAltitudeVar.get() == 'On':
731 fFillTest3ExpectedAltitude.grid(row=4)
732 else:
733 fFillTest3ExpectedAltitude.grid_remove()
734 def analogVarioChanged():
735 if analogVarioExist.get() == 'On':
736 fAnalogVario.grid(row=8)
737 else:
738 fAnalogVario.grid_remove()
741 root = Tk()
742 root.title("openXsensor configurator V1.0.3")
743 nb = ttk.Notebook(root)
744 nb.enable_traversal()
745 fMain = ttk.Frame(nb)
746 fPpm = ttk.Frame(nb) # page 1
747 fVario = ttk.Frame(nb) # page 2
748 fVoltage = ttk.Frame(nb) # page 3
749 fCurrent = ttk.Frame(nb) # page 4
750 fGps = ttk.Frame(nb) # page 5
751 fAirspeed = ttk.Frame(nb) # page 6
752 fRpm = ttk.Frame(nb) # page 7
753 fImu = ttk.Frame(nb) # page 8
754 fMagnet = ttk.Frame(nb) # page 9
755 fFlow = ttk.Frame(nb) # page 10
756 fAdc = ttk.Frame(nb) # page 11
757 fLocator = ttk.Frame(nb) # page 12
758 fSequence = ttk.Frame(nb) # page 13
759 fAddFields = ttk.Frame(nb) # page 14
760 fFrsky = ttk.Frame(nb) # page 15
761 fJeti = ttk.Frame(nb) # page 16
762 fHott = ttk.Frame(nb) # page 17
763 fMultiplex = ttk.Frame(nb) # page 18
765 ppmExist = StringVar(value='Off')
766 varioExist = StringVar(value='Off')
767 voltageExist = StringVar(value='Off')
768 currentExist = StringVar(value='Off')
769 gpsExist = StringVar(value='Off')
770 airspeedExist = StringVar(value='Off')
771 rpmExist = StringVar(value='Off')
772 imuExist = StringVar(value='Off')
773 magnetExist = StringVar(value='Off')
774 flowExist = StringVar(value='Off')
775 locatorExist = StringVar(value='Off')
776 adcExist = StringVar(value='Off')
777 sequenceExist = StringVar(value='Off')
778 addFieldsExist = StringVar(value='Off')
780 fPpmType = ttk.Frame(fPpm)
781 ppmTypeVar = StringVar(value='Rx chanel')
782 ppmPinVar = IntVar(value = 2)
783 ppmForMin100Var = IntVar(value = 1000)
784 ppmForPlus100Var = IntVar(value = 2000)
786 varioTypeVar = StringVar(value='MS5611')
788 secondBaroExist = StringVar(value='Off')
789 varioSourceVar = StringVar(value='FIRST_BARO')
790 varioHysteresisVar = IntVar(value=5)
793 fAnalogVario = ttk.Frame(fVario)
794 analogVarioExist = StringVar(value='Off')
795 varioAnalogPinVar = StringVar(value='3')
796 varioAnalogMinVar = DoubleVar(value=-3)
797 varioAnalogMaxVar = DoubleVar(value=3)
799 airspeedTypeVar = StringVar(value='MS4525')
800 airspeedAtSea15CVar = StringVar(value='Off')
801 airspeedInKmhVar = StringVar(value='Off')
802 airspeedResetAtPpmVar = IntVar(value=100)
803 airspeedCompMinAtPpmVar = IntVar(value=60)
804 airspeedCompMaxAtPpmVar = IntVar(value=90)
805 airspeedCompMinVar = IntVar(value=80)
806 airspeedCompMaxVar = IntVar(value=140)
808 volt1Exist = StringVar(value='Off')
809 volt2Exist = StringVar(value='Off')
810 volt3Exist = StringVar(value='Off')
811 volt4Exist = StringVar(value='Off')
812 volt5Exist = StringVar(value='Off')
813 volt6Exist = StringVar(value='Off')
814 volt1PinVar = StringVar(value='0')
815 volt2PinVar = StringVar(value='1')
816 volt3PinVar = StringVar(value='2')
817 volt4PinVar = StringVar(value='3')
818 volt5PinVar = StringVar(value='6')
819 volt6PinVar = StringVar(value='7')
821 volt1RgVar = DoubleVar(value='0.0')
822 volt2RgVar = DoubleVar(value='0.0')
823 volt3RgVar = DoubleVar(value='0.0')
824 volt4RgVar = DoubleVar(value='0.0')
825 volt5RgVar = DoubleVar(value='0.0')
826 volt6RgVar = DoubleVar(value='0.0')
828 volt1RvVar = DoubleVar(value='0.0')
829 volt2RvVar = DoubleVar(value='0.0')
830 volt3RvVar = DoubleVar(value='0.0')
831 volt4RvVar = DoubleVar(value='0.0')
832 volt5RvVar = DoubleVar(value='0.0')
833 volt6RvVar = DoubleVar(value='0.0')
835 volt1ScaleVar = DoubleVar(value='1.0')
836 volt2ScaleVar = DoubleVar(value='1.0')
837 volt3ScaleVar = DoubleVar(value='1.0')
838 volt4ScaleVar = DoubleVar(value='1.0')
839 volt5ScaleVar = DoubleVar(value='1.0')
840 volt6ScaleVar = DoubleVar(value='1.0')
842 volt1OffsetVar = DoubleVar(value='0.0')
843 volt2OffsetVar = DoubleVar(value='0.0')
844 volt3OffsetVar = DoubleVar(value='0.0')
845 volt4OffsetVar = DoubleVar(value='0.0')
846 volt5OffsetVar = DoubleVar(value='0.0')
847 volt6OffsetVar = DoubleVar(value='0.0')
849 voltNumberOfCellsVar = StringVar(value='0')
850 voltReferenceVar = StringVar(value='Internal')
851 voltRefValueVar = IntVar(value='5000')
853 currentPinVar = StringVar(value='0')
854 currentMvoltAt0Var = DoubleVar(value='0.0')
855 currentMvoltPerAmpVar = DoubleVar(value='0.0')
856 currentRgVar = DoubleVar(value='0.0')
857 currentRcVar = DoubleVar(value='0.0')
859 pulsesPerRotationVar = IntVar(value=2)
861 gps3dExist = StringVar(value='Off')
862 gpsRateVar = StringVar(value='5')
864 fFillTest3ExpectedAltitude = ttk.Frame(fAddFields)
865 fillTest3ExpectedAltitudeVar = StringVar(value='Off')
866 expAltTimeVar = DoubleVar(value='1.5')
867 fillTest1VarioTemperatureVar = StringVar(value='Off')
868 fillTest123LinearAccVar = StringVar(value='Off')
869 fillTest12VspeedAltVar = StringVar(value='Off')
870 fillTest1DteVar = StringVar(value='Off')
871 fillTest2PpmAirspeedCompVar = StringVar(value='Off')
872 fillTest1YawRateVar = StringVar(value='Off')
873 fillTest1HeadingVar = StringVar(value='Off')
874 fillTest123FlowVar = StringVar(value='Off')
875 fillTest1GpsNbrSatVar = StringVar(value='Off')
876 fillTest2GpsHdopVar = StringVar(value='Off')
878 protocolVar = StringVar(value='FRSKY_SPORT')
879 pinToRxVar = StringVar(value='4')
881 frskyVfasVar= StringVar(value='Not sent')
882 frskyFuelVar= StringVar(value='Not sent')
883 frskyA3Var= StringVar(value='Not sent')
884 frskyA4Var= StringVar(value='Not sent')
885 frskyAccxVar= StringVar(value='Not sent')
886 frskyAccyVar= StringVar(value='Not sent')
887 frskyAcczVar= StringVar(value='Not sent')
888 frskyT1Var= StringVar(value='Not sent')
889 frskyT2Var= StringVar(value='Not sent')
891 multiplexLine1Var = StringVar(value='Not sent')
892 multiplexLine2Var = StringVar(value='Not sent')
893 multiplexLine3Var = StringVar(value='Not sent')
894 multiplexLine4Var = StringVar(value='Not sent')
895 multiplexLine5Var = StringVar(value='Not sent')
896 multiplexLine6Var = StringVar(value='Not sent')
897 multiplexLine7Var = StringVar(value='Not sent')
898 multiplexLine8Var = StringVar(value='Not sent')
899 multiplexLine9Var = StringVar(value='Not sent')
901 hottCellUndervoltageVar = IntVar(value=3300)
902 hottBattery1SourceVar = StringVar(value='Not sent')
903 hottBattery2SourceVar = StringVar(value='Not sent')
904 hottMainBatterySourceVar = StringVar(value='Not sent')
905 hottT1SourceVar = StringVar(value='Not sent')
906 hottT2SourceVar = StringVar(value='Not sent')
908 jetiVoltageSourceVar = StringVar(value='Not sent')
909 jetiTemperatureSourceVar = StringVar(value='Not sent')